﻿/**
 * Proyecto: Cognitum
 * Global IT Services 2008
 * @author Mislas
 */

Cognitum.Cobranza.Pago.Entity = function (){
	if (LOG.isDebugEnabled()) {
		LOG.debug('[Pago.Entity.ctor] <-');
	}
	Cognitum.Cobranza.Pago.Entity.superclass.constructor.call(this);
	if (LOG.isDebugEnabled()) {
		LOG.debug('[Pago.Entity.ctor] <-');
	}
}

Ext.extend(Cognitum.Cobranza.Pago.Entity, Karma.Core.Entity, {
	id: 'Pago.Entity',
	name: 'Pagos',
	editorXType: 'pag.editor',
	columns: [
	    { Name: 'Id', Property: 'Id', Mostrar: false },
		{ Name: 'Fecha', Property: 'Fecha', Tipo: 'fecha'},	
		{ Name: 'Referencia', Property: 'Referencia'},
	    { Name: 'Importe', Property: 'Importe'},
		{ Name: 'Tipo', Property: 'Tipo', Tipo: 'enum', 
			TipoEnum: 'Cognitum.Dominio.Cobranza.TipoPagoEnum'},
		{ Name: 'Banco', Property: 'Banco.Nombre'}
	],
	searchlist: {
		sortings: [ 'Id'],
		views: [
			{ Id: 0, Nombre: 'Normal', Template: null },
			{ Id: 1, Nombre: 'Expandida', Template: null }
		],
		previewTemplate: null		
	},
	link: {
		displayProperty: 'Referencia'
	}
});

Cognitum.Pagos = Cognitum.Cobranza.Pago.Entity;